//
//  UIViewController+Category.h
//  jujing
//
//  Created by xiatiejun on 2021/9/8.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (Category)

- (void)dismissToRootViewController;


- (void)dismissToRootViewController:(BOOL)animated completion: (void (^ __nullable)(void))completion;
- (void)dismissToRootViewControllerWithAnimated:(BOOL)animated;
- (NSArray *)removeNavChildViewControllers:(NSArray <NSString *>*)controllers;

- (void)showLoading;
- (void)showLoadingOffsetCenterY:(CGFloat)centerY;
- (void)showLoadingInView:(UIView *)view;
- (void)hiddenLoadingInView:(UIView *)view;
- (void)hiddenLoading;
- (BOOL)isAnimation;

- (void)alertWithTitle:(nullable NSString *)title message:(nullable NSString *)message leftButtonName:(nullable NSString *)leftButtonName rightButtonName:(nullable NSString *)rightButtonName leftButtonBlock:(nullable void (^)(void))leftButtonBlock rightButtonBlock:(nullable void (^)(void))rightButtonBlock;

- (void)alertWithTitle:(nullable NSString *)title message:(nullable NSString *)message actions:(NSArray *)actions;

@end

NS_ASSUME_NONNULL_END
